<div class="well-sm">
	<h3><%- i18next.t(app_settings[0].app_name) %> - <%- i18next.t('Settings') %></h3>
</div>
<%  if(!_.isEmpty(app_settings[0].settings_description)){ %>
<div class="alert alert-info list-group-item-text"><%= i18next.t(app_settings[0].settings_description) %></div>
<% } %>
<div class="well-sm"></div>
<form class="js-app-setting-form" role="form" id="js-app-setting-form">
<% if (app_settings.length > 0 ) { 
var folder = '';
_.each(app_settings, function(app_setting) { 
	folder = app_setting.folder;
	if(_.isUndefined(app_setting.is_hide) && (app_setting.is_hide != 'true')){
%>
	<div class="form-group col-xs-12">
			  <label class="col-sm-2  control-label col-xs-12"><%- i18next.t(app_setting.label ) %></label>
			  <div class=" col-sm-7  col-xs-12">
				<% if(!_.isUndefined(app_setting.is_encrypted) && (app_setting.is_encrypted === true)){ %>
					<input type="text" value="" class="form-control" name="<%- app_setting.name %>" id="<%- app_setting.name %>">
				<% } else { %>
					<input type="text" value="<%- app_setting.value %>" class="form-control" name="<%- app_setting.name %>" id="<%- app_setting.name %>">					
				<% } %>
				<div><span class="help-block"><%- app_setting.info %></span></div>
			  </div>
	</div>
<% } %>
<% }); 
} %>
<input type="hidden" value="<%- folder %>" name="folder" id="folder">
  <div class="form-group">
	<label for="submit" class="sr-only  col-sm-4  control-label col-xs-12"><%- i18next.t('Submit') %></label>
	<div class="col-xs-offset-2">
	<input type="submit" value="<%- i18next.t('Update') %>" id="submit" class="btn btn-primary">
	</div>
  </div>
</form>
<%  var currenturl = window.location;
	if(!_.isUndefined(currenturl.hash) && (currenturl.hash === '#/apps/r_ldap_login')){
	   %>
<div class="well-sm">
		<legend>
			<span class="show h4"><%- i18next.t('Import LDAP users') %></span>
		</legend>
		<div class="form-group">
		 <div class=" col-sm-7  col-xs-12">
				<input type="checkbox" value="" name="enableImportUsers" id="enableImportUsers" class="js-enable-import-user">
				<label for="enableImportUsers"><%- i18next.t('Import Groups from LDAP into Organizations and put users under organization. If this option is unchecked, only the users will be imported (not organization)') %> </label>
		</div>
		<div class="form-group">
			<div class=" col-sm-7  col-xs-12">
				<input type="checkbox" value="" name="dontSendWelcomeMail" id="dontSendWelcomeMail">
				<label for="dontSendWelcomeMail"><%- i18next.t("Don't send welcome email") %> </label>
			</div>
		</div>
		<div class="form-group">
			<label for="enableImportUsersSubmit" class="sr-only col-sm-4 control-label col-xs-12"><%- i18next.t('Import users') %></label>
			<div class="col-sm-8">
			<button type="button" id="importUsersSubmit" class="js-import-users btn btn-primary"><%- i18next.t('Import users') %></button>
			<span class="clearfix hide" id="js-loader-img"><span class="cssloader"></span></span>
			</div>
			</div>
		</div>
<% } %>